package genetic.operators;

import java.util.Random;

import genetic.interfaces.Individual;
import genetic.interfaces.Mutation;

public class MutationAdd<I extends Individual<Integer,?>> implements Mutation<I> {

	private static Random rand = new Random();
	@Override
	public void mutation(I individual) {
		int i = rand.nextInt(individual.getNumberOfGenes());
		int v = individual.getGene(i);
		individual.setGene(i, v+1);
	}

}
